package org.will.cqrs.command;

import org.reveno.atp.api.commands.CommandContext;

/**
 * Created by EdifierWill on 2016/8/11.
 */
public interface ICommand <TDomainModel>{

    void setDomainModelClass(Class<TDomainModel> domainModelClass);

    void needNewId(boolean makeNewId);

    Long getNewId();

    void handleCommand(ICommand cmd, CommandContext ctx) throws Exception;

    ICommandAction createAction(ICommand cmd) throws Exception;
}
